import { h, render } from 'preact';
import Behavior from './behavior/Behavior';
import Archor from './Archor';
import Rect from '../basic-shape/Rect';
import BaseNode from './BaseNode';
import { observer } from 'mobx-react';

export default class RectNode extends BaseNode {
  getShape () {
    const attributes = this.getAttributes();
    return <Rect
      {...attributes }
    />
  }
  getArchorsPosition() {
    const { x, y, width, height } = this.getAttributes();
    return [
      { x, y: y - height /2 },
      { x: x + width / 2, y },
      { x, y: y + height / 2 },
      { x: x - width / 2, y}
    ]
  }
}
